# Prototype
snippet proto
	${1:class_name}.prototype.${2:method_name} =
	function(${3:first_argument}) {
		${4:// body...}
	};
# Function
snippet fun
	function ${1:function_name} (${2:argument}) {
		${3:// body...}
	}
# Anonymous Function
snippet f
	function(${1}) {${2}}
# if
snippet if
	if (${1:true}) {
	    ${2}
	}
# if ... else
snippet ife
	if (${1:true}) {
	    ${2}
	} else {
	    ${3}
	}
# tertiary conditional
snippet t
	${1:/* condition */} ? ${2:a} : ${3:b}
# switch
snippet switch
	switch(${1:expression}) {
		case '${3:case}':
			${4:// code}
			break;
		${5}
		default:
			${2:// code}
	}
# case
snippet case
	case '${1:case}':
		${2:// code}
		break;
	${3}
# for (...) {...}
snippet for
	for (var ${2:i} = 0,j = ${1:Things}.length; $2 < j; $2${3:++}) {
		${4:$1[$2]}
	};
# for (...) {...} (Improved Native For-Loop)
snippet forr
	for (var ${2:i} = ${1:Things}.length - 1; $2 >= 0; $2${3:--}) {
		${4:$1[$2]}
	};
snippet try
		try {
			$(1)
		} catch(e) {
			$(2)
		}
# while (...) {...}
snippet wh
	while (${1:/* condition */}) {
		${2:/* code */}
	}
# do...while
snippet do
	do {
		${2:/* code */}
	} while (${1:/* condition */});
# Object Method
snippet :f
	${1:method_name}: function(${2:attribute}) {
		${4}
	}${3:,}
# setTimeout function
snippet timeout
	setTimeout(function() {${3}}${2}, ${1:10};
# Get Elements
snippet get
	getElementsBy${1:TagName}('${2}')${3}
# Get Element
snippet gett
	getElementBy${1:Id}('${2}')${3}
# jQuery
snippet $
	$(${1:"selector"}).${2:method}(${3})${4};
snippet $(
	$(function(){
		${1://code}
	});
snippet $.each
	$.each(${1:array|object}, function(${2:o}){
		${3:this}
	});
snippet $$
	(function($){
	    ${1://code}
	})(jQuery);
snippet /*
	/**
	 * ${1:Describe what this method does}
	 * @param {${2:String|Object|Array|Boolean|Number}} ${3:paramName} ${4:Describe this parameter}
	 * @returns ${5:Describe what it returns}
	 */
snippet bug
	console.${1:log}(${2});
snippet single
	/**
	 * ${7:Describe what this singleton object does}
	 * @param {${8:String|Object|Array|Boolean|Number}} ${9:paramName} 
	 * @returns 
	 */
	var ${1:Singleton} = (function(){
		${2}
		return {
			${3:publicMethod}: function(${5:opt}) {
				${4://code}
			}${6:,}	
		};
	})();
snippet module
	/**
	 * ${5:Describe what this module does}
	 * @param {object} ${6:paramName}
	 */
	var ${1:classname} = (function(){
		var $1Object = {
			${2:privateMethod1}: function(){
				
			},
			${3:privateMethod2}: function(){
				
			}
		};
		return function(opt){
			var publicObj = {
				options: {},
				$2: $1Object.$2,
				$3: $1Object.$3${4:,} 
			};
			$.extend(publicObj.options, opt);
			return publicObj;
		};
	})();
